package com.serviceImpl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.dao.ManagerDao;
import com.model.Manager;
import com.service.ManagerService;

@Component("managerService")
public class ManagerServiceImpl implements ManagerService{
	private ManagerDao managerDao;
	
	public void addMananger(Manager manager) {
		managerDao.addMananger(manager);
	}
	public void deleteMananger(Manager manager) {
		managerDao.deleteMananger(manager);
	}
	public boolean exists(Manager manager) {
		return managerDao.exists(manager);
	}
	public void updateManager(Manager manager) {
		managerDao.updateManager(manager);
	}
	
	public ManagerDao getManagerDao() {
		return managerDao;
	}
	@Resource
	public void setManagerDao(ManagerDao managerDao) {
		this.managerDao = managerDao;
	}
	public Manager checkManager(String account, String password) {	
		return this.managerDao.loadMananger(account, password);
	}
	public List<Manager> queryManagerList(String hql) {
		return this.managerDao.getManagerList(hql);
	}
	
	
}
